// pages/newhousedetails/newhousedetails.js
let app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    swiperList: [{
      id: 0,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84000.jpg'
    }, {
      id: 1,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84001.jpg',
    }, {
      id: 2,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big39000.jpg'
    }, {
      id: 3,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg'
    }, {
      id: 4,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big25011.jpg'
    }, {
      id: 5,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big21016.jpg'
    }, {
      id: 6,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg'
    }],
    newhouseTabs: [
      { id: 'curr0', name: '房源详情' }, { id: 'curr1', name: '在售房型' }, { id: 'curr2', name: '周边设施' }, { id: 'curr3', name: '项目特色' }
    ],
    newhouseData: [
      {
        id: 'curr0',
        title: '房源详情',
        roomFrom: [{ name: '物业类型:', content: '商品房,公寓' }, { name: '产权年限::', content: '999' }, { name: ' 项目单价:', content: '  11万元/㎡' }, { name: '使用面积: :', content: '86㎡' }, { name: '交房标准:', content: '精装修' }, { name: '交房时间:', content: '2022-12' }], purpose: '投资理财,生活自住,旅游度假,养老储备,教育留学'
      },
      {
        id: 'curr1', title: '在售户型', roomSwiper: [{
          id: 0,
          type: 'image',
          url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84000.jpg',
          size: '2居室/86.3',
          price: '136.8'
        }, {
          id: 1,
          type: 'image',
          url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84001.jpg',
          size: '2居室/86.3',
          price: '136.8'
        }, {
          id: 2,
          type: 'image',
          url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big39000.jpg',
          size: '2居室/86.3',
          price: '136.8'
        }, {
          id: 3,
          type: 'image',
          url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg',
          size: '2居室/86.3',
          price: '136.8'
        }, {
          id: 4,
          type: 'image',
          url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big25011.jpg',
          size: '2居室/86.3',
          price: '136.8'
        }, {
          id: 5,
          type: 'image',
          url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big21016.jpg',
          size: '2居室/86.3',
          price: '136.8'
        }, {
          id: 6,
          type: 'image',
          url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg',
          size: '2居室/86.3',
          price: '136.8'
        }]
      },
      {
        id: 'curr2',
        title: '周边设施',
        tip: '信息仅供参考,  详情请咨询购房专家',
        school: 'King’s College London-Waterloo Campus、伦敦国王学院、伦敦政经学院',
        live: '多彻斯特酒店',
        traffic: 'Westminster、滑铁卢车站、Waterloo'
      },
      {
        id: 'curr3',
        title: '项目特色',
        content: [{
          text: 'One Thames City 位于伦敦一区黄金地带, 紧邻 泰晤士河畔, 开窗即是伦敦眼或美国大使馆。囊括伦敦一区和九榆树广场的绝佳地理位置, 将重绘伦敦天际线, 重新定义城市核心圈的处世姿态。登临其上, 俯瞰泰晤士河的惊艳天际线, 一睹国际都会的繁华之美。',
          src: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84001.jpg'
        }, {
          text: 'One Thames City 位于伦敦一区黄金地带, 紧邻 泰晤士河畔, 开窗即是伦敦眼或美国大使馆。囊括伦敦一区和九榆树广场的绝佳地理位置, 将重绘伦敦天际线, 重新定义城市核心圈的处世姿态。登临其上, 俯瞰泰晤士河的惊艳天际线, 一睹国际都会的繁华之美。',
          src: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84001.jpg'
        },]
      },
    ],
    swiperCurrent: 0,
    collectFlag: false,
    vxCoerFlag: false,
    advCoerFlag: false,
    resCoerFlag: false,
    toView: ''
  },
  newhouseTabsClick: function (e) {
    let tabsCurrent = e.currentTarget.dataset.tabscurrent;
    let tabsid = e.currentTarget.dataset.tabsid;
    let that = this;
    that.setData({
      tabsCurrent: tabsCurrent,
      toView: tabsid
    })
  },
  swiperHomeChange: function (e) {
    let current = e.detail.current;
    let that = this;
    that.setData({
      swiperCurrent: current,
    })
  },
  roomCollect: function (e) {
    let that = this;
    that.setData({
      collectFlag: !that.data.collectFlag,
    })
  },
  vxCoerFlag() {
    let that = this;
    that.setData({
      vxCoerFlag: !that.data.vxCoerFlag
    })
  },
  advCoerFlag() {
    let that = this;
    that.setData({
      advCoerFlag: !that.data.advCoerFlag
    })
  },
  resCoerFlag() {
    let that = this;
    that.setData({
      resCoerFlag: !that.data.resCoerFlag
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let that = this
    that.setData({
      height: app.globalData.clientHeight3,
      tabTop: app.globalData.tabTop,
      tabbarH: app.globalData.tabbarH
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})